package cn.tedu.myweb.vo;

import lombok.Data;
import org.springframework.security.core.parameters.P;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
public class RegisterVo {
    @NotBlank(message = "用户名不能为空！")
    private String username;
    @NotBlank(message = "手机号不能为空！")
    @Pattern(regexp = "^\\d{11}$",message = "手机号不正确！")
    private String phone;
    @NotBlank(message = "邮箱不能为空！")
    @Pattern(regexp = "^\\w+@\\w+(.\\w{2,})$",message = "邮箱格式错误！")//w单词字符
    private String email;
    @NotBlank(message = "密码不能为空！")
    @Pattern(regexp = "^\\w{6,20}$",message = "密码是6~20位字符")
    private String password;
    @NotBlank(message = "确认密码不能为空！")
    private String confirm;
}
